unit OrderValidator;

interface

uses
  Order;

type

  IOrderValidator = interface
  ['{1E6F189D-05B6-4898-B5E8-8E10DC56A4D6}']
    function ValidateOrder(aOrder: TOrder): Boolean;
  end;

  TOrderValidator = class(TInterfacedObject, IOrderValidator)
    function ValidateOrder(aOrder: TOrder): Boolean;
  end;

implementation

{ TOrderValidator }

uses Spring.XE.Utils;

function TOrderValidator.ValidateOrder(aOrder: TOrder): Boolean;
begin
  Result := aOrder <> nil;

  WriteLn('Validating Order....');

end;

initialization
  TSpringXEUtils.TryRegisterClass(TOrderValidator);

end.
